﻿namespace BSKTV.Model
{
    public class MusicModel
    {
        /// <summary>
        /// 歌曲ID
        /// </summary>
        public string SongId { get; set; }

        /// <summary>
        /// 歌手
        /// </summary>
        public string Author { get; set; }

        /// <summary>
        /// 歌曲地址
        /// </summary>
        public string Link { get; set; }

        /// <summary>
        /// 专题图片
        /// </summary>
        public string Pic { get; set; }

        /// <summary>
        /// 歌曲名称
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 类型
        /// </summary>
        public string Type { get; set; }

        public string TypeName { get; set; }

        /// <summary>
        /// 播放地址
        /// </summary>
        public string Url { get; set; }

        /// <summary>
        /// 歌词
        /// </summary>
        public string Lrc { get; set; }

        /// <summary>
        /// mv hash
        /// </summary>
        public string MvHash { get; set; }

        /// <summary>
        /// 是否已下载
        /// </summary>
        public bool IsLocal { get; set; }

        /// <summary>
        /// 本地路径
        /// </summary>
        public string LocalPath { get; set; }

        /// <summary>
        /// 是否支持伴奏
        /// </summary>
        public bool IsBz { get; set; }

        public static string GetTypeName(string type)
        {
            string name = "";
            switch (type)
            {
                case Constant.MUSIC_SOURCE_TYPE_MV91:
                    name = "91MV";
                    break;
                default:
                    name = "未知";
                    break;
            }
            return name;
        }

        public override string ToString()
        {
            return $"[{GetTypeName(Type)}][{Author}]{Title}";
        }
    }
}
